package exception1;
/**
 * @Author: cjj
 * @Date: 2025/4/29
 * tack
 */
public class tack {
    public void man(Person p) throws GenderException {
        if(p.gender.equals("男")){
            System.out.println("欢迎光临");
        }else{
            throw new GenderException("性别错误");
        }
    }
}
